

/* this ALWAYS GENERATED file contains the definitions for the interfaces */


 /* File created by MIDL compiler version 7.00.0500 */
/* at Thu Apr 21 16:56:20 2011
 */
/* Compiler settings for .\AMan.idl:
    Oicf, W1, Zp8, env=Win32 (32b run)
    protocol : dce , ms_ext, c_ext, robust
    error checks: stub_data 
    VC __declspec() decoration level: 
         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
         DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING(  )

#pragma warning( disable: 4049 )  /* more than 64k source lines */


/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif

#include "rpc.h"
#include "rpcndr.h"

#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__

#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/

#ifndef __AMan_i_h__
#define __AMan_i_h__

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif

/* Forward Declarations */ 

#ifndef __IManager_FWD_DEFINED__
#define __IManager_FWD_DEFINED__
typedef interface IManager IManager;
#endif 	/* __IManager_FWD_DEFINED__ */


#ifndef __IServer_FWD_DEFINED__
#define __IServer_FWD_DEFINED__
typedef interface IServer IServer;
#endif 	/* __IServer_FWD_DEFINED__ */


#ifndef __ISessions_FWD_DEFINED__
#define __ISessions_FWD_DEFINED__
typedef interface ISessions ISessions;
#endif 	/* __ISessions_FWD_DEFINED__ */


#ifndef __IProcesses_FWD_DEFINED__
#define __IProcesses_FWD_DEFINED__
typedef interface IProcesses IProcesses;
#endif 	/* __IProcesses_FWD_DEFINED__ */


#ifndef __Manager_FWD_DEFINED__
#define __Manager_FWD_DEFINED__

#ifdef __cplusplus
typedef class Manager Manager;
#else
typedef struct Manager Manager;
#endif /* __cplusplus */

#endif 	/* __Manager_FWD_DEFINED__ */


/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"

#ifdef __cplusplus
extern "C"{
#endif 


/* interface __MIDL_itf_AMan_0000_0000 */
/* [local] */ 

#if 0
// definitions for MIDL
#pragma once
#pragma once
#pragma once
typedef CHAR *NPSTR;

typedef CHAR *LPSTR;

typedef CHAR *PSTR;

typedef WCHAR *NWPSTR;

typedef WCHAR *LPWSTR;

typedef WCHAR *PWSTR;

typedef CHAR *PCHAR;

typedef CHAR *LPCH;

typedef CHAR *PCH;

typedef ULONG *PULONG;

typedef HANDLE *PHANDLE;

typedef DWORD SECURITY_INFORMATION;

typedef DWORD *PSECURITY_INFORMATION;

typedef PVOID PSECURITY_DESCRIPTOR;

#pragma once
typedef 
enum _WTS_CONNECTSTATE_CLASS
    {	WTSActive	= 0,
	WTSConnected	= ( WTSActive + 1 ) ,
	WTSConnectQuery	= ( WTSConnected + 1 ) ,
	WTSShadow	= ( WTSConnectQuery + 1 ) ,
	WTSDisconnected	= ( WTSShadow + 1 ) ,
	WTSIdle	= ( WTSDisconnected + 1 ) ,
	WTSListen	= ( WTSIdle + 1 ) ,
	WTSReset	= ( WTSListen + 1 ) ,
	WTSDown	= ( WTSReset + 1 ) ,
	WTSInit	= ( WTSDown + 1 ) 
    } 	WTS_CONNECTSTATE_CLASS;

typedef struct _WTS_SERVER_INFOW
    {
    LPWSTR pServerName;
    } 	WTS_SERVER_INFOW;

typedef struct _WTS_SERVER_INFOW *PWTS_SERVER_INFOW;

typedef struct _WTS_SERVER_INFOA
    {
    LPSTR pServerName;
    } 	WTS_SERVER_INFOA;

typedef struct _WTS_SERVER_INFOA *PWTS_SERVER_INFOA;

typedef struct _WTS_SESSION_INFOW
    {
    DWORD SessionId;
    LPWSTR pWinStationName;
    WTS_CONNECTSTATE_CLASS State;
    } 	WTS_SESSION_INFOW;

typedef struct _WTS_SESSION_INFOW *PWTS_SESSION_INFOW;

typedef struct _WTS_SESSION_INFOA
    {
    DWORD SessionId;
    LPSTR pWinStationName;
    WTS_CONNECTSTATE_CLASS State;
    } 	WTS_SESSION_INFOA;

typedef struct _WTS_SESSION_INFOA *PWTS_SESSION_INFOA;

typedef struct _WTS_PROCESS_INFOW
    {
    DWORD SessionId;
    DWORD ProcessId;
    LPWSTR pProcessName;
    PSID pUserSid;
    } 	WTS_PROCESS_INFOW;

typedef struct _WTS_PROCESS_INFOW *PWTS_PROCESS_INFOW;

typedef struct _WTS_PROCESS_INFOA
    {
    DWORD SessionId;
    DWORD ProcessId;
    LPSTR pProcessName;
    PSID pUserSid;
    } 	WTS_PROCESS_INFOA;

typedef struct _WTS_PROCESS_INFOA *PWTS_PROCESS_INFOA;

typedef 
enum _WTS_INFO_CLASS
    {	WTSInitialProgram	= 0,
	WTSApplicationName	= ( WTSInitialProgram + 1 ) ,
	WTSWorkingDirectory	= ( WTSApplicationName + 1 ) ,
	WTSOEMId	= ( WTSWorkingDirectory + 1 ) ,
	WTSSessionId	= ( WTSOEMId + 1 ) ,
	WTSUserName	= ( WTSSessionId + 1 ) ,
	WTSWinStationName	= ( WTSUserName + 1 ) ,
	WTSDomainName	= ( WTSWinStationName + 1 ) ,
	WTSConnectState	= ( WTSDomainName + 1 ) ,
	WTSClientBuildNumber	= ( WTSConnectState + 1 ) ,
	WTSClientName	= ( WTSClientBuildNumber + 1 ) ,
	WTSClientDirectory	= ( WTSClientName + 1 ) ,
	WTSClientProductId	= ( WTSClientDirectory + 1 ) ,
	WTSClientHardwareId	= ( WTSClientProductId + 1 ) ,
	WTSClientAddress	= ( WTSClientHardwareId + 1 ) ,
	WTSClientDisplay	= ( WTSClientAddress + 1 ) ,
	WTSClientProtocolType	= ( WTSClientDisplay + 1 ) ,
	WTSIdleTime	= ( WTSClientProtocolType + 1 ) ,
	WTSLogonTime	= ( WTSIdleTime + 1 ) ,
	WTSIncomingBytes	= ( WTSLogonTime + 1 ) ,
	WTSOutgoingBytes	= ( WTSIncomingBytes + 1 ) ,
	WTSIncomingFrames	= ( WTSOutgoingBytes + 1 ) ,
	WTSOutgoingFrames	= ( WTSIncomingFrames + 1 ) 
    } 	WTS_INFO_CLASS;

typedef struct _WTS_CLIENT_ADDRESS
    {
    DWORD AddressFamily;
    BYTE Address[ 20 ];
    } 	WTS_CLIENT_ADDRESS;

typedef struct _WTS_CLIENT_ADDRESS *PWTS_CLIENT_ADDRESS;

typedef struct _WTS_CLIENT_DISPLAY
    {
    DWORD HorizontalResolution;
    DWORD VerticalResolution;
    DWORD ColorDepth;
    } 	WTS_CLIENT_DISPLAY;

typedef struct _WTS_CLIENT_DISPLAY *PWTS_CLIENT_DISPLAY;

typedef 
enum _WTS_CONFIG_CLASS
    {	WTSUserConfigInitialProgram	= 0,
	WTSUserConfigWorkingDirectory	= ( WTSUserConfigInitialProgram + 1 ) ,
	WTSUserConfigfInheritInitialProgram	= ( WTSUserConfigWorkingDirectory + 1 ) ,
	WTSUserConfigfAllowLogonTerminalServer	= ( WTSUserConfigfInheritInitialProgram + 1 ) ,
	WTSUserConfigTimeoutSettingsConnections	= ( WTSUserConfigfAllowLogonTerminalServer + 1 ) ,
	WTSUserConfigTimeoutSettingsDisconnections	= ( WTSUserConfigTimeoutSettingsConnections + 1 ) ,
	WTSUserConfigTimeoutSettingsIdle	= ( WTSUserConfigTimeoutSettingsDisconnections + 1 ) ,
	WTSUserConfigfDeviceClientDrives	= ( WTSUserConfigTimeoutSettingsIdle + 1 ) ,
	WTSUserConfigfDeviceClientPrinters	= ( WTSUserConfigfDeviceClientDrives + 1 ) ,
	WTSUserConfigfDeviceClientDefaultPrinter	= ( WTSUserConfigfDeviceClientPrinters + 1 ) ,
	WTSUserConfigBrokenTimeoutSettings	= ( WTSUserConfigfDeviceClientDefaultPrinter + 1 ) ,
	WTSUserConfigReconnectSettings	= ( WTSUserConfigBrokenTimeoutSettings + 1 ) ,
	WTSUserConfigModemCallbackSettings	= ( WTSUserConfigReconnectSettings + 1 ) ,
	WTSUserConfigModemCallbackPhoneNumber	= ( WTSUserConfigModemCallbackSettings + 1 ) ,
	WTSUserConfigShadowingSettings	= ( WTSUserConfigModemCallbackPhoneNumber + 1 ) ,
	WTSUserConfigTerminalServerProfilePath	= ( WTSUserConfigShadowingSettings + 1 ) ,
	WTSUserConfigTerminalServerHomeDir	= ( WTSUserConfigTerminalServerProfilePath + 1 ) ,
	WTSUserConfigTerminalServerHomeDirDrive	= ( WTSUserConfigTerminalServerHomeDir + 1 ) ,
	WTSUserConfigfTerminalServerRemoteHomeDir	= ( WTSUserConfigTerminalServerHomeDirDrive + 1 ) 
    } 	WTS_CONFIG_CLASS;

typedef 
enum _WTS_VIRTUAL_CLASS
    {	WTSVirtualClientData	= 0,
	WTSVirtualFileHandle	= ( WTSVirtualClientData + 1 ) 
    } 	WTS_VIRTUAL_CLASS;

BOOL __stdcall WTSEnumerateServersW( 
    LPWSTR pDomainName,
    DWORD Reserved,
    DWORD Version,
    PWTS_SERVER_INFOW *ppServerInfo,
    DWORD *pCount);

BOOL __stdcall WTSEnumerateServersA( 
    LPSTR pDomainName,
    DWORD Reserved,
    DWORD Version,
    PWTS_SERVER_INFOA *ppServerInfo,
    DWORD *pCount);

HANDLE __stdcall WTSOpenServerW( 
    LPWSTR pServerName);

HANDLE __stdcall WTSOpenServerA( 
    LPSTR pServerName);

void __stdcall WTSCloseServer( 
    HANDLE hServer);

BOOL __stdcall WTSEnumerateSessionsW( 
    HANDLE hServer,
    DWORD Reserved,
    DWORD Version,
    PWTS_SESSION_INFOW *ppSessionInfo,
    DWORD *pCount);

BOOL __stdcall WTSEnumerateSessionsA( 
    HANDLE hServer,
    DWORD Reserved,
    DWORD Version,
    PWTS_SESSION_INFOA *ppSessionInfo,
    DWORD *pCount);

BOOL __stdcall WTSEnumerateProcessesW( 
    HANDLE hServer,
    DWORD Reserved,
    DWORD Version,
    PWTS_PROCESS_INFOW *ppProcessInfo,
    DWORD *pCount);

BOOL __stdcall WTSEnumerateProcessesA( 
    HANDLE hServer,
    DWORD Reserved,
    DWORD Version,
    PWTS_PROCESS_INFOA *ppProcessInfo,
    DWORD *pCount);

BOOL __stdcall WTSTerminateProcess( 
    HANDLE hServer,
    DWORD ProcessId,
    DWORD ExitCode);

BOOL __stdcall WTSQuerySessionInformationW( 
    HANDLE hServer,
    DWORD SessionId,
    WTS_INFO_CLASS WTSInfoClass,
    LPWSTR *ppBuffer,
    DWORD *pBytesReturned);

BOOL __stdcall WTSQuerySessionInformationA( 
    HANDLE hServer,
    DWORD SessionId,
    WTS_INFO_CLASS WTSInfoClass,
    LPSTR *ppBuffer,
    DWORD *pBytesReturned);

BOOL __stdcall WTSQueryUserConfigW( 
    LPWSTR pServerName,
    LPWSTR pUserName,
    WTS_CONFIG_CLASS WTSConfigClass,
    LPWSTR *ppBuffer,
    DWORD *pBytesReturned);

BOOL __stdcall WTSQueryUserConfigA( 
    LPSTR pServerName,
    LPSTR pUserName,
    WTS_CONFIG_CLASS WTSConfigClass,
    LPSTR *ppBuffer,
    DWORD *pBytesReturned);

BOOL __stdcall WTSSetUserConfigW( 
    LPWSTR pServerName,
    LPWSTR pUserName,
    WTS_CONFIG_CLASS WTSConfigClass,
    LPWSTR pBuffer,
    DWORD DataLength);

BOOL __stdcall WTSSetUserConfigA( 
    LPSTR pServerName,
    LPSTR pUserName,
    WTS_CONFIG_CLASS WTSConfigClass,
    LPSTR pBuffer,
    DWORD DataLength);

BOOL __stdcall WTSSendMessageW( 
    HANDLE hServer,
    DWORD SessionId,
    LPWSTR pTitle,
    DWORD TitleLength,
    LPWSTR pMessage,
    DWORD MessageLength,
    DWORD Style,
    DWORD Timeout,
    DWORD *pResponse,
    BOOL bWait);

BOOL __stdcall WTSSendMessageA( 
    HANDLE hServer,
    DWORD SessionId,
    LPSTR pTitle,
    DWORD TitleLength,
    LPSTR pMessage,
    DWORD MessageLength,
    DWORD Style,
    DWORD Timeout,
    DWORD *pResponse,
    BOOL bWait);

BOOL __stdcall WTSDisconnectSession( 
    HANDLE hServer,
    DWORD SessionId,
    BOOL bWait);

BOOL __stdcall WTSLogoffSession( 
    HANDLE hServer,
    DWORD SessionId,
    BOOL bWait);

BOOL __stdcall WTSShutdownSystem( 
    HANDLE hServer,
    DWORD ShutdownFlag);

BOOL __stdcall WTSWaitSystemEvent( 
    HANDLE hServer,
    DWORD EventMask,
    DWORD *pEventFlags);

HANDLE __stdcall WTSVirtualChannelOpen( 
    HANDLE hServer,
    DWORD SessionId,
    LPSTR pVirtualName);

BOOL __stdcall WTSVirtualChannelClose( 
    HANDLE hChannelHandle);

BOOL __stdcall WTSVirtualChannelRead( 
    HANDLE hChannelHandle,
    ULONG TimeOut,
    PCHAR Buffer,
    ULONG BufferSize,
    PULONG pBytesRead);

BOOL __stdcall WTSVirtualChannelWrite( 
    HANDLE hChannelHandle,
    PCHAR Buffer,
    ULONG Length,
    PULONG pBytesWritten);

BOOL __stdcall WTSVirtualChannelPurgeInput( 
    HANDLE hChannelHandle);

BOOL __stdcall WTSVirtualChannelPurgeOutput( 
    HANDLE hChannelHandle);

BOOL __stdcall WTSVirtualChannelQuery( 
    HANDLE hChannelHandle,
    WTS_VIRTUAL_CLASS __MIDL____MIDL_itf_AMan_0000_00000000,
    PVOID *ppBuffer,
    DWORD *pBytesReturned);

void __stdcall WTSFreeMemory( 
    PVOID pMemory);

BOOL __stdcall WTSRegisterSessionNotification( 
    HWND hWnd,
    DWORD dwFlags);

BOOL __stdcall WTSUnRegisterSessionNotification( 
    HWND hWnd);

BOOL __stdcall WTSRegisterSessionNotificationEx( 
    HANDLE hServer,
    HWND hWnd,
    DWORD dwFlags);

BOOL __stdcall WTSUnRegisterSessionNotificationEx( 
    HANDLE hServer,
    HWND hWnd);

BOOL __stdcall WTSQueryUserToken( 
    ULONG SessionId,
    PHANDLE phToken);

#endif
#include <wtsapi32.h>





extern RPC_IF_HANDLE __MIDL_itf_AMan_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_AMan_0000_0000_v0_0_s_ifspec;

#ifndef __IManager_INTERFACE_DEFINED__
#define __IManager_INTERFACE_DEFINED__

/* interface IManager */
/* [unique][helpstring][nonextensible][dual][uuid][object] */ 


EXTERN_C const IID IID_IManager;

#if defined(__cplusplus) && !defined(CINTERFACE)
    
    MIDL_INTERFACE("2C167B6D-A25B-4AF6-8B3F-661A26D62100")
    IManager : public IDispatch
    {
    public:
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetServersNames( 
            /* [retval][out] */ SAFEARRAY * *pServers) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE AddServer( 
            /* [in] */ BSTR sName) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetServerByName( 
            /* [in] */ BSTR sName,
            /* [retval][out] */ IServer **piServ) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE RemoveServer( 
            /* [in] */ BSTR sName) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE LoadServers( void) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SaveServers( void) = 0;
        
    };
    
#else 	/* C style interface */

    typedef struct IManagerVtbl
    {
        BEGIN_INTERFACE
        
        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
            IManager * This,
            /* [in] */ REFIID riid,
            /* [iid_is][out] */ 
            __RPC__deref_out  void **ppvObject);
        
        ULONG ( STDMETHODCALLTYPE *AddRef )( 
            IManager * This);
        
        ULONG ( STDMETHODCALLTYPE *Release )( 
            IManager * This);
        
        HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 
            IManager * This,
            /* [out] */ UINT *pctinfo);
        
        HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 
            IManager * This,
            /* [in] */ UINT iTInfo,
            /* [in] */ LCID lcid,
            /* [out] */ ITypeInfo **ppTInfo);
        
        HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 
            IManager * This,
            /* [in] */ REFIID riid,
            /* [size_is][in] */ LPOLESTR *rgszNames,
            /* [range][in] */ UINT cNames,
            /* [in] */ LCID lcid,
            /* [size_is][out] */ DISPID *rgDispId);
        
        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 
            IManager * This,
            /* [in] */ DISPID dispIdMember,
            /* [in] */ REFIID riid,
            /* [in] */ LCID lcid,
            /* [in] */ WORD wFlags,
            /* [out][in] */ DISPPARAMS *pDispParams,
            /* [out] */ VARIANT *pVarResult,
            /* [out] */ EXCEPINFO *pExcepInfo,
            /* [out] */ UINT *puArgErr);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetServersNames )( 
            IManager * This,
            /* [retval][out] */ SAFEARRAY * *pServers);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *AddServer )( 
            IManager * This,
            /* [in] */ BSTR sName);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetServerByName )( 
            IManager * This,
            /* [in] */ BSTR sName,
            /* [retval][out] */ IServer **piServ);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RemoveServer )( 
            IManager * This,
            /* [in] */ BSTR sName);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *LoadServers )( 
            IManager * This);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SaveServers )( 
            IManager * This);
        
        END_INTERFACE
    } IManagerVtbl;

    interface IManager
    {
        CONST_VTBL struct IManagerVtbl *lpVtbl;
    };

    

#ifdef COBJMACROS


#define IManager_QueryInterface(This,riid,ppvObject)	\
    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

#define IManager_AddRef(This)	\
    ( (This)->lpVtbl -> AddRef(This) ) 

#define IManager_Release(This)	\
    ( (This)->lpVtbl -> Release(This) ) 


#define IManager_GetTypeInfoCount(This,pctinfo)	\
    ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) 

#define IManager_GetTypeInfo(This,iTInfo,lcid,ppTInfo)	\
    ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) 

#define IManager_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)	\
    ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) 

#define IManager_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)	\
    ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) 


#define IManager_GetServersNames(This,pServers)	\
    ( (This)->lpVtbl -> GetServersNames(This,pServers) ) 

#define IManager_AddServer(This,sName)	\
    ( (This)->lpVtbl -> AddServer(This,sName) ) 

#define IManager_GetServerByName(This,sName,piServ)	\
    ( (This)->lpVtbl -> GetServerByName(This,sName,piServ) ) 

#define IManager_RemoveServer(This,sName)	\
    ( (This)->lpVtbl -> RemoveServer(This,sName) ) 

#define IManager_LoadServers(This)	\
    ( (This)->lpVtbl -> LoadServers(This) ) 

#define IManager_SaveServers(This)	\
    ( (This)->lpVtbl -> SaveServers(This) ) 

#endif /* COBJMACROS */


#endif 	/* C style interface */




#endif 	/* __IManager_INTERFACE_DEFINED__ */


#ifndef __IServer_INTERFACE_DEFINED__
#define __IServer_INTERFACE_DEFINED__

/* interface IServer */
/* [unique][helpstring][nonextensible][dual][uuid][object] */ 


EXTERN_C const IID IID_IServer;

#if defined(__cplusplus) && !defined(CINTERFACE)
    
    MIDL_INTERFACE("1804289E-9C44-41E8-B677-AB93653818D2")
    IServer : public IDispatch
    {
    public:
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetServerName( 
            /* [retval][out] */ BSTR *Name) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSessions( 
            /* [retval][out] */ SAFEARRAY * *piSes) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Shutdown( void) = 0;
        
    };
    
#else 	/* C style interface */

    typedef struct IServerVtbl
    {
        BEGIN_INTERFACE
        
        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
            IServer * This,
            /* [in] */ REFIID riid,
            /* [iid_is][out] */ 
            __RPC__deref_out  void **ppvObject);
        
        ULONG ( STDMETHODCALLTYPE *AddRef )( 
            IServer * This);
        
        ULONG ( STDMETHODCALLTYPE *Release )( 
            IServer * This);
        
        HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 
            IServer * This,
            /* [out] */ UINT *pctinfo);
        
        HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 
            IServer * This,
            /* [in] */ UINT iTInfo,
            /* [in] */ LCID lcid,
            /* [out] */ ITypeInfo **ppTInfo);
        
        HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 
            IServer * This,
            /* [in] */ REFIID riid,
            /* [size_is][in] */ LPOLESTR *rgszNames,
            /* [range][in] */ UINT cNames,
            /* [in] */ LCID lcid,
            /* [size_is][out] */ DISPID *rgDispId);
        
        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 
            IServer * This,
            /* [in] */ DISPID dispIdMember,
            /* [in] */ REFIID riid,
            /* [in] */ LCID lcid,
            /* [in] */ WORD wFlags,
            /* [out][in] */ DISPPARAMS *pDispParams,
            /* [out] */ VARIANT *pVarResult,
            /* [out] */ EXCEPINFO *pExcepInfo,
            /* [out] */ UINT *puArgErr);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetServerName )( 
            IServer * This,
            /* [retval][out] */ BSTR *Name);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSessions )( 
            IServer * This,
            /* [retval][out] */ SAFEARRAY * *piSes);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Shutdown )( 
            IServer * This);
        
        END_INTERFACE
    } IServerVtbl;

    interface IServer
    {
        CONST_VTBL struct IServerVtbl *lpVtbl;
    };

    

#ifdef COBJMACROS


#define IServer_QueryInterface(This,riid,ppvObject)	\
    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

#define IServer_AddRef(This)	\
    ( (This)->lpVtbl -> AddRef(This) ) 

#define IServer_Release(This)	\
    ( (This)->lpVtbl -> Release(This) ) 


#define IServer_GetTypeInfoCount(This,pctinfo)	\
    ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) 

#define IServer_GetTypeInfo(This,iTInfo,lcid,ppTInfo)	\
    ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) 

#define IServer_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)	\
    ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) 

#define IServer_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)	\
    ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) 


#define IServer_GetServerName(This,Name)	\
    ( (This)->lpVtbl -> GetServerName(This,Name) ) 

#define IServer_GetSessions(This,piSes)	\
    ( (This)->lpVtbl -> GetSessions(This,piSes) ) 

#define IServer_Shutdown(This)	\
    ( (This)->lpVtbl -> Shutdown(This) ) 

#endif /* COBJMACROS */


#endif 	/* C style interface */




#endif 	/* __IServer_INTERFACE_DEFINED__ */


#ifndef __ISessions_INTERFACE_DEFINED__
#define __ISessions_INTERFACE_DEFINED__

/* interface ISessions */
/* [unique][helpstring][nonextensible][dual][uuid][object] */ 


EXTERN_C const IID IID_ISessions;

#if defined(__cplusplus) && !defined(CINTERFACE)
    
    MIDL_INTERFACE("148F0E94-AC1D-4A17-86D5-B02A66D54745")
    ISessions : public IDispatch
    {
    public:
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSessionId( 
            /* [retval][out] */ DWORD *pId) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetAddressInfo( 
            /* [retval][out] */ WTS_CLIENT_ADDRESS *AddrInf) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDisplayInfo( 
            /* [retval][out] */ WTS_CLIENT_DISPLAY *DispInf) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetProtocolInfo( 
            /* [retval][out] */ BSTR *ProtInf) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDirectoryInfo( 
            /* [retval][out] */ BSTR *DirInf) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetStationNameInfo( 
            /* [retval][out] */ BSTR *Name) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetUserNameInfo( 
            /* [retval][out] */ BSTR *Name) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Logoff( void) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetProcesses( 
            /* [retval][out] */ SAFEARRAY * *piProc) = 0;
        
    };
    
#else 	/* C style interface */

    typedef struct ISessionsVtbl
    {
        BEGIN_INTERFACE
        
        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
            ISessions * This,
            /* [in] */ REFIID riid,
            /* [iid_is][out] */ 
            __RPC__deref_out  void **ppvObject);
        
        ULONG ( STDMETHODCALLTYPE *AddRef )( 
            ISessions * This);
        
        ULONG ( STDMETHODCALLTYPE *Release )( 
            ISessions * This);
        
        HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 
            ISessions * This,
            /* [out] */ UINT *pctinfo);
        
        HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 
            ISessions * This,
            /* [in] */ UINT iTInfo,
            /* [in] */ LCID lcid,
            /* [out] */ ITypeInfo **ppTInfo);
        
        HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 
            ISessions * This,
            /* [in] */ REFIID riid,
            /* [size_is][in] */ LPOLESTR *rgszNames,
            /* [range][in] */ UINT cNames,
            /* [in] */ LCID lcid,
            /* [size_is][out] */ DISPID *rgDispId);
        
        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 
            ISessions * This,
            /* [in] */ DISPID dispIdMember,
            /* [in] */ REFIID riid,
            /* [in] */ LCID lcid,
            /* [in] */ WORD wFlags,
            /* [out][in] */ DISPPARAMS *pDispParams,
            /* [out] */ VARIANT *pVarResult,
            /* [out] */ EXCEPINFO *pExcepInfo,
            /* [out] */ UINT *puArgErr);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSessionId )( 
            ISessions * This,
            /* [retval][out] */ DWORD *pId);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetAddressInfo )( 
            ISessions * This,
            /* [retval][out] */ WTS_CLIENT_ADDRESS *AddrInf);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDisplayInfo )( 
            ISessions * This,
            /* [retval][out] */ WTS_CLIENT_DISPLAY *DispInf);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetProtocolInfo )( 
            ISessions * This,
            /* [retval][out] */ BSTR *ProtInf);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDirectoryInfo )( 
            ISessions * This,
            /* [retval][out] */ BSTR *DirInf);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetStationNameInfo )( 
            ISessions * This,
            /* [retval][out] */ BSTR *Name);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetUserNameInfo )( 
            ISessions * This,
            /* [retval][out] */ BSTR *Name);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Logoff )( 
            ISessions * This);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetProcesses )( 
            ISessions * This,
            /* [retval][out] */ SAFEARRAY * *piProc);
        
        END_INTERFACE
    } ISessionsVtbl;

    interface ISessions
    {
        CONST_VTBL struct ISessionsVtbl *lpVtbl;
    };

    

#ifdef COBJMACROS


#define ISessions_QueryInterface(This,riid,ppvObject)	\
    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

#define ISessions_AddRef(This)	\
    ( (This)->lpVtbl -> AddRef(This) ) 

#define ISessions_Release(This)	\
    ( (This)->lpVtbl -> Release(This) ) 


#define ISessions_GetTypeInfoCount(This,pctinfo)	\
    ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) 

#define ISessions_GetTypeInfo(This,iTInfo,lcid,ppTInfo)	\
    ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) 

#define ISessions_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)	\
    ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) 

#define ISessions_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)	\
    ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) 


#define ISessions_GetSessionId(This,pId)	\
    ( (This)->lpVtbl -> GetSessionId(This,pId) ) 

#define ISessions_GetAddressInfo(This,AddrInf)	\
    ( (This)->lpVtbl -> GetAddressInfo(This,AddrInf) ) 

#define ISessions_GetDisplayInfo(This,DispInf)	\
    ( (This)->lpVtbl -> GetDisplayInfo(This,DispInf) ) 

#define ISessions_GetProtocolInfo(This,ProtInf)	\
    ( (This)->lpVtbl -> GetProtocolInfo(This,ProtInf) ) 

#define ISessions_GetDirectoryInfo(This,DirInf)	\
    ( (This)->lpVtbl -> GetDirectoryInfo(This,DirInf) ) 

#define ISessions_GetStationNameInfo(This,Name)	\
    ( (This)->lpVtbl -> GetStationNameInfo(This,Name) ) 

#define ISessions_GetUserNameInfo(This,Name)	\
    ( (This)->lpVtbl -> GetUserNameInfo(This,Name) ) 

#define ISessions_Logoff(This)	\
    ( (This)->lpVtbl -> Logoff(This) ) 

#define ISessions_GetProcesses(This,piProc)	\
    ( (This)->lpVtbl -> GetProcesses(This,piProc) ) 

#endif /* COBJMACROS */


#endif 	/* C style interface */




#endif 	/* __ISessions_INTERFACE_DEFINED__ */


#ifndef __IProcesses_INTERFACE_DEFINED__
#define __IProcesses_INTERFACE_DEFINED__

/* interface IProcesses */
/* [unique][helpstring][nonextensible][dual][uuid][object] */ 


EXTERN_C const IID IID_IProcesses;

#if defined(__cplusplus) && !defined(CINTERFACE)
    
    MIDL_INTERFACE("1F991E03-0AE3-453F-8D99-C9776340E085")
    IProcesses : public IDispatch
    {
    public:
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetProcessId( 
            /* [retval][out] */ DWORD *pId) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetProcessName( 
            /* [retval][out] */ BSTR *pName) = 0;
        
        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Terminate( void) = 0;
        
    };
    
#else 	/* C style interface */

    typedef struct IProcessesVtbl
    {
        BEGIN_INTERFACE
        
        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
            IProcesses * This,
            /* [in] */ REFIID riid,
            /* [iid_is][out] */ 
            __RPC__deref_out  void **ppvObject);
        
        ULONG ( STDMETHODCALLTYPE *AddRef )( 
            IProcesses * This);
        
        ULONG ( STDMETHODCALLTYPE *Release )( 
            IProcesses * This);
        
        HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 
            IProcesses * This,
            /* [out] */ UINT *pctinfo);
        
        HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 
            IProcesses * This,
            /* [in] */ UINT iTInfo,
            /* [in] */ LCID lcid,
            /* [out] */ ITypeInfo **ppTInfo);
        
        HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 
            IProcesses * This,
            /* [in] */ REFIID riid,
            /* [size_is][in] */ LPOLESTR *rgszNames,
            /* [range][in] */ UINT cNames,
            /* [in] */ LCID lcid,
            /* [size_is][out] */ DISPID *rgDispId);
        
        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 
            IProcesses * This,
            /* [in] */ DISPID dispIdMember,
            /* [in] */ REFIID riid,
            /* [in] */ LCID lcid,
            /* [in] */ WORD wFlags,
            /* [out][in] */ DISPPARAMS *pDispParams,
            /* [out] */ VARIANT *pVarResult,
            /* [out] */ EXCEPINFO *pExcepInfo,
            /* [out] */ UINT *puArgErr);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetProcessId )( 
            IProcesses * This,
            /* [retval][out] */ DWORD *pId);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetProcessName )( 
            IProcesses * This,
            /* [retval][out] */ BSTR *pName);
        
        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Terminate )( 
            IProcesses * This);
        
        END_INTERFACE
    } IProcessesVtbl;

    interface IProcesses
    {
        CONST_VTBL struct IProcessesVtbl *lpVtbl;
    };

    

#ifdef COBJMACROS


#define IProcesses_QueryInterface(This,riid,ppvObject)	\
    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

#define IProcesses_AddRef(This)	\
    ( (This)->lpVtbl -> AddRef(This) ) 

#define IProcesses_Release(This)	\
    ( (This)->lpVtbl -> Release(This) ) 


#define IProcesses_GetTypeInfoCount(This,pctinfo)	\
    ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) 

#define IProcesses_GetTypeInfo(This,iTInfo,lcid,ppTInfo)	\
    ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) 

#define IProcesses_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)	\
    ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) 

#define IProcesses_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)	\
    ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) 


#define IProcesses_GetProcessId(This,pId)	\
    ( (This)->lpVtbl -> GetProcessId(This,pId) ) 

#define IProcesses_GetProcessName(This,pName)	\
    ( (This)->lpVtbl -> GetProcessName(This,pName) ) 

#define IProcesses_Terminate(This)	\
    ( (This)->lpVtbl -> Terminate(This) ) 

#endif /* COBJMACROS */


#endif 	/* C style interface */




#endif 	/* __IProcesses_INTERFACE_DEFINED__ */



#ifndef __AManLib_LIBRARY_DEFINED__
#define __AManLib_LIBRARY_DEFINED__

/* library AManLib */
/* [helpstring][version][uuid] */ 


EXTERN_C const IID LIBID_AManLib;

EXTERN_C const CLSID CLSID_Manager;

#ifdef __cplusplus

class DECLSPEC_UUID("95284E9E-ABD5-434C-945F-70E807D36C3A")
Manager;
#endif
#endif /* __AManLib_LIBRARY_DEFINED__ */

/* Additional Prototypes for ALL interfaces */

unsigned long             __RPC_USER  BSTR_UserSize(     unsigned long *, unsigned long            , BSTR * ); 
unsigned char * __RPC_USER  BSTR_UserMarshal(  unsigned long *, unsigned char *, BSTR * ); 
unsigned char * __RPC_USER  BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); 
void                      __RPC_USER  BSTR_UserFree(     unsigned long *, BSTR * ); 

unsigned long             __RPC_USER  LPSAFEARRAY_UserSize(     unsigned long *, unsigned long            , LPSAFEARRAY * ); 
unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal(  unsigned long *, unsigned char *, LPSAFEARRAY * ); 
unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); 
void                      __RPC_USER  LPSAFEARRAY_UserFree(     unsigned long *, LPSAFEARRAY * ); 

/* end of Additional Prototypes */

#ifdef __cplusplus
}
#endif

#endif


